using System;
using System.Collections.Generic;
using System.Text;

namespace TaskLogger
{
    public class ListItem
    {
        private string name;
        private int id;

        public ListItem(string name, int id)
        {
            this.name = name;
            this.id = id;
        }

        public override string ToString()
        {
            return name;
        }

        public int Id
        {
            get { return id; }
        }

        public override bool Equals(object obj)
        {
            if (obj.GetType() == typeof(ListItem))
                return ((ListItem)obj).ToString() == name;
            else
                return false;
        }

        public override int GetHashCode()
        {
            return name.GetHashCode();
        }
    }
}
